import 'dart:convert';

import 'package:enterprise_v6_app/app/data/entities/application/basic_information/device_detection_entity.dart';
import 'package:enterprise_v6_app/generated/json/base/json_field.dart';
import 'package:enterprise_v6_app/generated/json/hazard_facility_entity.g.dart';
export 'package:enterprise_v6_app/generated/json/hazard_facility_entity.g.dart';

///设备信息
@JsonSerializable()
class HazardFacilityEntity {
  HazardFacilityEntity();

  factory HazardFacilityEntity.fromJson(Map<String, dynamic> json) => $HazardFacilityEntityFromJson(json);

  /// 设备备用连接地址
  String? backupLinkAddress = '';

  ///	建造日期
  String? buildDate = '';

  ///	安全仪表连锁回路旁路数的指标编码
  String? bypassSwitchTotalLocaleNo = '';

  ///	装置所属工艺（字典）
  String? chemicalProcessTypeDicId = '';

  ///	装置所属工艺（展示）
  String? chemicalProcessTypeDicIdLabel = '';

  ///	企业编码
  String? companyCode = '';

  ///	创建人
  String? createBy = '';

  ///	创建人id
  String? createById = '';

  ///	创建时间
  String? createDate = '';

  ///	删除标记 正常0，已删除1
  String? deleted = '';

  ///	设计储量，吨
  double? designReserve = 0;

  ///	检测记录列表
  List<DeviceDetectionEntity>? deviceDetectionList = [];

  ///	设备编码
  String? equipCode = '';

  ///	设备描述
  String? equipDescribe = '';

  ///	设备等级（数据字典）
  String? equipLevel = '';

  ///	设备等级（数据字典展示）
  String? equipLevelLabel = '';

  ///	设备名称
  String? equipName = '';

  ///	设备运行状态 0停用，1在用
  String? equipStatus = '';

  ///	设备类型
  String? equipTypeDicId = '';

  ///设备类型
  String? equipTypeDicIdLabel = '';

  ///	占地面积，平方米
  double? floorArea = 0;

  ///	危险源编码
  String? hazardCode = '';

  ///	主键ID
  String? id = '';

  ///	安全仪表连锁回路总数
  double? doubleerlockingCount = 0;

  ///	纬度
  String? latitude = '';

  ///	液位最高值
  double? liquidLevel = 0;

  ///	经度
  String? longitude = '';

  ///	安全仪表系统投用状态的指标编码
  String? mainSwitchStatusLocaleNo = '';

  ///	最近检维修日期
  String? maintenanceDate = '';

  ///	设备主连接地址
  String? manLinkAddress = '';

  ///	存储介质
  String? medium = '';

  ///	介质形态（字典）
  String? mediumStatusDicId = '';

  ///	介质形态（展示）
  String? mediumStatusDicIdLabel = '';

  ///	监测气体
  String? monitorGas = '';

  ///	监测气体(展示)
  late String monitorGasLabel = '';

  ///	气体传感器类型（字典）
  String? monitorTypeDicId = '';

  ///	气体传感器类型（展示）
  String? monitorTypeDicIdLabel = '';

  ///	设计压力
  double? pressureDesign = 0;

  ///	最高工作压力
  double? pressureMax = 0;

  ///	压力类型（字典）
  String? pressureTypeDicId = '';

  ///	压力类型（展示）
  String? pressureTypeDicIdLabel = '';

  ///	点位信息
  String? ptInfo = '';

  ///	储量
  double? reserves = 0;

  ///	危险源ID
  String? riskObjectId = '';

  ///	仓库的投产日期
  String? startDate = '';

  ///	仓库类型/站台类型（字典）
  String? storeTypeDicId = '';

  ///	仓库类型/站台类型（展示）
  String? storeTypeDicIdLabel = '';

  ///	罐类型
  String? tankTypeDicId = '';

  ///	罐类型
  String? tankTypeDicIdLabel = '';

  ///	设计温度高限
  double? temperatureMax = 0;

  ///	设计温度低限
  double? temperatureMin = 0;

  ///	温度类型（字典）
  String? temperatureTypeDicId = '';

  ///	温度类型（展示）
  String? temperatureTypeDicIdLabel = '';

  ///
  String? updateBy = '';

  ///
  String? updateById = '';

  ///
  String? updateDate = '';

  ///
  String? useDate = '';

  ///	上传文件
  late List<String> filePath = [];

  /// 是否为压力容器（0为否，1为是）
  late String isPressureVessel = '';

  /// 是否拥有压力管道（0为否，1为是）
  late String havePressurePipeline = '';

  /// 是否为锅炉（0为否，1为是）
  late String isBoiler = '';

  /// 安全仪表联锁回路总数
  late int interlockingCount = 0;


  Map<String, dynamic> toJson() => $HazardFacilityEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
